<?php

namespace app\models;
use yii\db\ActiveRecord;

class CustSource extends ActiveRecord
{
    public function getParentCustSources()
    {
        return $this->hasOne(CustSource::className(), ['id' => 'parent_source_id']);
        // return $this->hasOne(Region::className(), ['id' => 'parent_region_id'])->viaTable(Region::tableName() . 'as d',  ['id' => 'region_id']);
    }

}

?>
